package com.hzw.saas.web.storage.param;

import java.io.Serializable;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import org.springframework.web.multipart.MultipartFile;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @author zzl
 * @since 03/01/2021
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "系统资源上传参数", description = "资源上传请求参数")
public class SysResourcePostParam implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 文件名称
     */
    @NotBlank(message = "文件名称不可为空")
    @ApiModelProperty(value = "文件名称", position = 2, required = true)
    private String name;

    /**
     * 文件对象
     */
    @NotNull(message = "文件不可为空")
    @ApiModelProperty(value = "文件对象", position = 3, required = true)
    private transient MultipartFile file;

}
